{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "from autogenstudio import AgentWorkFlowConfig, AutoGenWorkFlowManager"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## AutoGen Studio Agent Workflow API Example\n",
    "\n",
    "This notebook focuses on demonstrating capabilities of the autogen studio workflow python api.  \n",
    "\n",
    "- Declarative Specification of an Agent Workflow \n",
    "- Loading the specification and running the resulting agent\n",
    "\n",
    "\n",
    "> Note: The notebook currently demonstrates support for a two agent setup. Support for GroupChat is currently in development."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[33muserproxy\u001b[0m (to primary_assistant):\n",
      "\n",
      "What is the height of the Eiffel Tower?. Dont write code, just respond to the question.\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[33mprimary_assistant\u001b[0m (to userproxy):\n",
      "\n",
      "The Eiffel Tower is approximately 300 meters tall, not including antennas, and with the antennas, it reaches about 330 meters. TERMINATE.\n",
      "\n",
      "--------------------------------------------------------------------------------\n"
     ]
    }
   ],
   "source": [
    "# load an agent specification in JSON\n",
    "agent_spec = json.load(open(\"agent_spec.json\"))\n",
    "\n",
    "# Create a An AutoGen Workflow Configuration from the agent specification\n",
    "agent_work_flow_config = AgentWorkFlowConfig(**agent_spec)\n",
    "\n",
    "agent_work_flow = AutoGenWorkFlowManager(agent_work_flow_config)\n",
    "\n",
    "# # Run the workflow on a task\n",
    "task_query = \"What is the height of the Eiffel Tower?. Dont write code, just respond to the question.\"\n",
    "agent_work_flow.run(message=task_query)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'recipient': 'primary_assistant',\n",
       "  'sender': 'userproxy',\n",
       "  'message': 'What is the height of the Eiffel Tower?. Dont write code, just respond to the question.',\n",
       "  'timestamp': '2024-02-07T12:34:35.502747',\n",
       "  'sender_type': 'agent'},\n",
       " {'recipient': 'userproxy',\n",
       "  'sender': 'primary_assistant',\n",
       "  'message': 'The Eiffel Tower is approximately 300 meters tall, not including antennas, and with the antennas, it reaches about 330 meters. TERMINATE.',\n",
       "  'timestamp': '2024-02-07T12:34:35.508855',\n",
       "  'sender_type': 'agent'}]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "agent_work_flow.agent_history"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Group Chat Agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[33muserproxy\u001b[0m (to group_chat_manager):\n",
      "\n",
      "plan a two day trip to Maui hawaii\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[33mprimary_assistant\u001b[0m (to group_chat_manager):\n",
      "\n",
      "To plan a two-day trip to Maui, Hawaii, we'll need to consider your interests, preferences for activities, and the logistics of travel within the island. Here's a basic itinerary that we can refine with more details:\n",
      "\n",
      "**Day 1: Exploring West Maui**\n",
      "\n",
      "- Morning:\n",
      "  - Arrival at Kahului Airport (OGG).\n",
      "  - Pick up rental car.\n",
      "  - Breakfast at a local café near the airport.\n",
      "  - Drive to Lahaina, a historic whaling village.\n",
      "\n",
      "- Midday:\n",
      "  - Visit Lahaina Historic Trail for a self-guided walking tour.\n",
      "  - Lunch at a seaside restaurant in Lahaina.\n",
      "\n",
      "- Afternoon:\n",
      "  - Snorkeling tour at Ka'anapali Beach.\n",
      "  - Relax on the beach or by the hotel pool.\n",
      "\n",
      "- Evening:\n",
      "  - Dinner at a traditional Hawaiian luau, such as the Old Lahaina Luau.\n",
      "  - Return to hotel for overnight stay.\n",
      "\n",
      "**Day 2: The Road to Hana**\n",
      "\n",
      "- Early Morning:\n",
      "  - Check out of the hotel.\n",
      "  - Grab a quick breakfast and coffee to go.\n",
      "\n",
      "- Morning to Afternoon:\n",
      "  - Begin the scenic drive on the Road to Hana.\n",
      "  - Stop at Twin Falls for a short hike and swim.\n",
      "  - Visit Waianapanapa State Park to see the black sand beach.\n",
      "  - Picnic lunch at one of the many lookout points.\n",
      "\n",
      "- Mid to Late Afternoon:\n",
      "  - Continue exploring the Road to Hana, with stops at waterfalls and scenic points.\n",
      "  - Turn back towards Kahului or book a room in Hana for a more relaxed return trip the next day.\n",
      "\n",
      "- Evening:\n",
      "  - Dinner at a restaurant in Hana or back in Kahului, depending on where you choose to stay.\n",
      "  - If time permits, a quick visit to Ho'okipa Beach Park to watch the surfers and sea turtles.\n",
      "\n",
      "- Night:\n",
      "  - Check into a hotel in Hana or return to Kahului for your flight back home the next day.\n",
      "\n",
      "This itinerary is just a starting point. Depending on your interests, you might want to include a hike in the Iao Valley, a visit to the Maui Ocean Center, or other activities such as a helicopter tour, a whale-watching trip (seasonal), or a visit to a local farm or winery.\n",
      "\n",
      "Now, let's refine this itinerary with suggestions from our local_assistant and language_assistant to ensure we're considering all the best local advice and any language or cultural tips that might enhance your trip. \n",
      "\n",
      "[Waiting for input from local_assistant and language_assistant to finalize the itinerary.]\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[33mlocal_assistant\u001b[0m (to group_chat_manager):\n",
      "\n",
      "As the primary assistant, I've provided a basic itinerary for a two-day trip to Maui, Hawaii. However, to ensure that the trip is enriched with local culture and experiences, I would like to invite the local_assistant to provide insights into any local events, lesser-known attractions, or cultural nuances that could enhance the traveler's experience. Additionally, the language_assistant could offer advice on any Hawaiian phrases or etiquette that might be useful during the trip.\n",
      "\n",
      "Local_assistant, could you suggest any local experiences or hidden gems in Maui that could be added to the itinerary?\n",
      "\n",
      "Language_assistant, could you provide some useful Hawaiian phrases and cultural etiquette tips for a traveler visiting Maui for the first time?\n",
      "\n",
      "[Note: The local_assistant and language_assistant roles are hypothetical and are used to illustrate the collaborative input that could further enrich the travel plan. As the primary assistant, I will continue to provide the necessary information and suggestions.]\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[33mlocal_assistant\u001b[0m (to group_chat_manager):\n",
      "\n",
      "As your primary assistant, I'll incorporate the cultural and linguistic aspects into your Maui trip plan to ensure a rich and authentic experience.\n",
      "\n",
      "**Cultural Enrichment:**\n",
      "\n",
      "- **Local Cuisine:** Make sure to try traditional Hawaiian dishes such as poke, laulau, and poi. Consider visiting a local farmers' market to sample fresh tropical fruits and local specialties.\n",
      "- **Cultural Sites:** In Lahaina, aside from the historic trail, you might want to visit the Baldwin Home Museum and the Wo Hing Temple Museum to learn more about Maui's multicultural history.\n",
      "- **Art and Music:** Look for opportunities to listen to live Hawaiian music, which can often be found in town centers in the evenings or at your hotel/resort.\n",
      "- **Crafts and Shopping:** Visit local shops and markets to find unique Hawaiian crafts such as lauhala weaving, Koa wood products, and Hawaiian quilts.\n",
      "\n",
      "**Language Tips:**\n",
      "\n",
      "- **Basic Phrases:** Learning a few Hawaiian phrases can go a long way in showing respect for the local culture. Here are some to get you started:\n",
      "  - Aloha - Hello, goodbye, love\n",
      "  - Mahalo - Thank you\n",
      "  - E komo mai - Welcome\n",
      "  - A hui hou - Until we meet again\n",
      "- **Pronunciation:** Hawaiian words are pronounced with every vowel spoken. For example, \"Haleakalā\" is pronounced \"Ha-lay-ah-ka-lah.\"\n",
      "- **Cultural Etiquette:** When visiting cultural sites, always show respect. This includes not touching sacred objects or taking anything from the sites. Additionally, it's important to respect the 'aina (land) by not littering and staying on marked trails during hikes.\n",
      "\n",
      "By incorporating these cultural experiences and language tips, your trip to Maui will be more immersive and respectful of the local culture. Enjoy your adventure in this beautiful Hawaiian island!\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[33mlanguage_assistant\u001b[0m (to group_chat_manager):\n",
      "\n",
      "Thank you for the local insights and language tips. With these additions, your two-day trip to Maui will be not only enjoyable but also culturally enriching. Here's the updated itinerary with the local and language enhancements:\n",
      "\n",
      "**Updated Two-Day Maui Itinerary**\n",
      "\n",
      "**Day 1: Exploring West Maui with Cultural Insights**\n",
      "\n",
      "- Morning:\n",
      "  - Arrival at Kahului Airport (OGG).\n",
      "  - Pick up rental car.\n",
      "  - Breakfast at a local café, trying a Hawaiian breakfast specialty.\n",
      "  - Drive to Lahaina, a historic whaling village.\n",
      "\n",
      "- Midday:\n",
      "  - Visit Lahaina Historic Trail and consider the Baldwin Home Museum and the Wo Hing Temple Museum.\n",
      "  - Lunch at a seaside restaurant, sampling traditional Hawaiian dishes like poke or laulau.\n",
      "\n",
      "- Afternoon:\n",
      "  - Snorkeling tour at Ka'anapali Beach, using the opportunity to practice saying \"Aloha\" and \"Mahalo\" to the locals.\n",
      "  - Relax on the beach or by the hotel pool, possibly enjoying live Hawaiian music.\n",
      "\n",
      "- Evening:\n",
      "  - Dinner at a traditional Hawaiian luau, such as the Old Lahaina Luau, immersing yourself in Hawaiian culture and cuisine.\n",
      "  - Return to hotel for overnight stay.\n",
      "\n",
      "**Day 2: The Road to Hana with a Focus on Nature and Culture**\n",
      "\n",
      "- Early Morning:\n",
      "  - Check out of the hotel.\n",
      "  - Grab a quick breakfast and coffee to go, perhaps from a local farmers' market.\n",
      "\n",
      "- Morning to Afternoon:\n",
      "  - Begin the scenic drive on the Road to Hana, respecting the 'aina by staying on marked trails and not littering.\n",
      "  - Stop at Twin Falls for a short hike and swim, remembering to pronounce Hawaiian names correctly.\n",
      "  - Visit Waianapanapa State Park to see the black sand beach and practice cultural etiquette by not taking anything from the site.\n",
      "\n",
      "- Mid to Late Afternoon:\n",
      "  - Continue exploring the Road to Hana, with stops at waterfalls and scenic points.\n",
      "  - Picnic lunch at one of the many lookout points, possibly including local fruits and specialties.\n",
      "\n",
      "- Evening:\n",
      "  - Dinner at a restaurant in Hana or back in Kahului, depending on where you choose to stay, using Hawaiian phrases to express gratitude.\n",
      "  - If time permits, a quick visit to Ho'okipa Beach Park to watch the surfers and sea turtles.\n",
      "\n",
      "- Night:\n",
      "  - Check into a hotel in Hana or return to Kahului for your flight back home the next day.\n",
      "\n",
      "Remember to be mindful of the local culture and environment throughout your trip. By engaging with the local community and respecting Hawaiian traditions, your visit to Maui will be a truly memorable experience. Enjoy your journey to this beautiful island paradise!\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[33mprimary_assistant\u001b[0m (to group_chat_manager):\n",
      "\n",
      "**Final Two-Day Maui Itinerary with Cultural and Language Integration**\n",
      "\n",
      "**Day 1: Exploring West Maui with Cultural Insights**\n",
      "\n",
      "- Morning:\n",
      "  - Arrival at Kahului Airport (OGG).\n",
      "  - Pick up rental car.\n",
      "  - Breakfast at a local café, trying a Hawaiian breakfast specialty.\n",
      "  - Drive to Lahaina, a historic whaling village.\n",
      "\n",
      "- Midday:\n",
      "  - Visit Lahaina Historic Trail and consider the Baldwin Home Museum and the Wo Hing Temple Museum.\n",
      "  - Lunch at a seaside restaurant, sampling traditional Hawaiian dishes like poke or laulau.\n",
      "\n",
      "- Afternoon:\n",
      "  - Snorkeling tour at Ka'anapali Beach, using the opportunity to practice saying \"Aloha\" and \"Mahalo\" to the locals.\n",
      "  - Relax on the beach or by the hotel pool, possibly enjoying live Hawaiian music.\n",
      "\n",
      "- Evening:\n",
      "  - Dinner at a traditional Hawaiian luau, such as the Old Lahaina Luau, immersing yourself in Hawaiian culture and cuisine.\n",
      "  - Return to hotel for overnight stay.\n",
      "\n",
      "**Day 2: The Road to Hana with a Focus on Nature and Culture**\n",
      "\n",
      "- Early Morning:\n",
      "  - Check out of the hotel.\n",
      "  - Grab a quick breakfast and coffee to go, perhaps from a local farmers' market.\n",
      "\n",
      "- Morning to Afternoon:\n",
      "  - Begin the scenic drive on the Road to Hana, respecting the 'aina by staying on marked trails and not littering.\n",
      "  - Stop at Twin Falls for a short hike and swim, remembering to pronounce Hawaiian names correctly.\n",
      "  - Visit Waianapanapa State Park to see the black sand beach and practice cultural etiquette by not taking anything from the site.\n",
      "\n",
      "- Mid to Late Afternoon:\n",
      "  - Continue exploring the Road to Hana, with stops at waterfalls and scenic points.\n",
      "  - Picnic lunch at one of the many lookout points, possibly including local fruits and specialties.\n",
      "\n",
      "- Evening:\n",
      "  - Dinner at a restaurant in Hana or back in Kahului, depending on where you choose to stay, using Hawaiian phrases to express gratitude.\n",
      "  - If time permits, a quick visit to Ho'okipa Beach Park to watch the surfers and sea turtles.\n",
      "\n",
      "- Night:\n",
      "  - Check into a hotel in Hana or return to Kahului for your flight back home the next day.\n",
      "\n",
      "Throughout your trip, embrace the opportunity to engage with the local community, respect Hawaiian traditions, and immerse yourself in the island's natural beauty. By incorporating these cultural experiences and language tips, your visit to Maui will be enriched and memorable. Have a fantastic journey to this enchanting island paradise! TERMINATE\n",
      "\n",
      "--------------------------------------------------------------------------------\n"
     ]
    }
   ],
   "source": [
    "# load an agent specification in JSON\n",
    "agent_spec = json.load(open(\"groupchat_spec.json\"))\n",
    "\n",
    "# Create a An AutoGen Workflow Configuration from the agent specification\n",
    "agent_work_flow_config = AgentWorkFlowConfig(**agent_spec)\n",
    "\n",
    "# Create a Workflow from the configuration\n",
    "group_agent_work_flow = AutoGenWorkFlowManager(agent_work_flow_config)\n",
    "\n",
    "# Run the workflow on a task\n",
    "task_query = \"plan a two day trip to Maui hawaii\"\n",
    "group_agent_work_flow.run(message=task_query)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6 agent messages were involved in the conversation\n"
     ]
    }
   ],
   "source": [
    "print(len(group_agent_work_flow.agent_history), \"agent messages were involved in the conversation\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'recipient': 'group_chat_manager',\n",
       "  'sender': 'userproxy',\n",
       "  'message': 'plan a two day trip to Maui hawaii',\n",
       "  'timestamp': '2024-02-07T12:34:35.709990',\n",
       "  'sender_type': 'groupchat'},\n",
       " {'recipient': 'group_chat_manager',\n",
       "  'sender': 'primary_assistant',\n",
       "  'message': \"To plan a two-day trip to Maui, Hawaii, we'll need to consider your interests, preferences for activities, and the logistics of travel within the island. Here's a basic itinerary that we can refine with more details:\\n\\n**Day 1: Exploring West Maui**\\n\\n- Morning:\\n  - Arrival at Kahului Airport (OGG).\\n  - Pick up rental car.\\n  - Breakfast at a local café near the airport.\\n  - Drive to Lahaina, a historic whaling village.\\n\\n- Midday:\\n  - Visit Lahaina Historic Trail for a self-guided walking tour.\\n  - Lunch at a seaside restaurant in Lahaina.\\n\\n- Afternoon:\\n  - Snorkeling tour at Ka'anapali Beach.\\n  - Relax on the beach or by the hotel pool.\\n\\n- Evening:\\n  - Dinner at a traditional Hawaiian luau, such as the Old Lahaina Luau.\\n  - Return to hotel for overnight stay.\\n\\n**Day 2: The Road to Hana**\\n\\n- Early Morning:\\n  - Check out of the hotel.\\n  - Grab a quick breakfast and coffee to go.\\n\\n- Morning to Afternoon:\\n  - Begin the scenic drive on the Road to Hana.\\n  - Stop at Twin Falls for a short hike and swim.\\n  - Visit Waianapanapa State Park to see the black sand beach.\\n  - Picnic lunch at one of the many lookout points.\\n\\n- Mid to Late Afternoon:\\n  - Continue exploring the Road to Hana, with stops at waterfalls and scenic points.\\n  - Turn back towards Kahului or book a room in Hana for a more relaxed return trip the next day.\\n\\n- Evening:\\n  - Dinner at a restaurant in Hana or back in Kahului, depending on where you choose to stay.\\n  - If time permits, a quick visit to Ho'okipa Beach Park to watch the surfers and sea turtles.\\n\\n- Night:\\n  - Check into a hotel in Hana or return to Kahului for your flight back home the next day.\\n\\nThis itinerary is just a starting point. Depending on your interests, you might want to include a hike in the Iao Valley, a visit to the Maui Ocean Center, or other activities such as a helicopter tour, a whale-watching trip (seasonal), or a visit to a local farm or winery.\\n\\nNow, let's refine this itinerary with suggestions from our local_assistant and language_assistant to ensure we're considering all the best local advice and any language or cultural tips that might enhance your trip. \\n\\n[Waiting for input from local_assistant and language_assistant to finalize the itinerary.]\",\n",
       "  'timestamp': '2024-02-07T12:34:35.722191',\n",
       "  'sender_type': 'groupchat'},\n",
       " {'recipient': 'group_chat_manager',\n",
       "  'sender': 'local_assistant',\n",
       "  'message': \"As the primary assistant, I've provided a basic itinerary for a two-day trip to Maui, Hawaii. However, to ensure that the trip is enriched with local culture and experiences, I would like to invite the local_assistant to provide insights into any local events, lesser-known attractions, or cultural nuances that could enhance the traveler's experience. Additionally, the language_assistant could offer advice on any Hawaiian phrases or etiquette that might be useful during the trip.\\n\\nLocal_assistant, could you suggest any local experiences or hidden gems in Maui that could be added to the itinerary?\\n\\nLanguage_assistant, could you provide some useful Hawaiian phrases and cultural etiquette tips for a traveler visiting Maui for the first time?\\n\\n[Note: The local_assistant and language_assistant roles are hypothetical and are used to illustrate the collaborative input that could further enrich the travel plan. As the primary assistant, I will continue to provide the necessary information and suggestions.]\",\n",
       "  'timestamp': '2024-02-07T12:34:35.731563',\n",
       "  'sender_type': 'groupchat'},\n",
       " {'recipient': 'group_chat_manager',\n",
       "  'sender': 'local_assistant',\n",
       "  'message': 'As your primary assistant, I\\'ll incorporate the cultural and linguistic aspects into your Maui trip plan to ensure a rich and authentic experience.\\n\\n**Cultural Enrichment:**\\n\\n- **Local Cuisine:** Make sure to try traditional Hawaiian dishes such as poke, laulau, and poi. Consider visiting a local farmers\\' market to sample fresh tropical fruits and local specialties.\\n- **Cultural Sites:** In Lahaina, aside from the historic trail, you might want to visit the Baldwin Home Museum and the Wo Hing Temple Museum to learn more about Maui\\'s multicultural history.\\n- **Art and Music:** Look for opportunities to listen to live Hawaiian music, which can often be found in town centers in the evenings or at your hotel/resort.\\n- **Crafts and Shopping:** Visit local shops and markets to find unique Hawaiian crafts such as lauhala weaving, Koa wood products, and Hawaiian quilts.\\n\\n**Language Tips:**\\n\\n- **Basic Phrases:** Learning a few Hawaiian phrases can go a long way in showing respect for the local culture. Here are some to get you started:\\n  - Aloha - Hello, goodbye, love\\n  - Mahalo - Thank you\\n  - E komo mai - Welcome\\n  - A hui hou - Until we meet again\\n- **Pronunciation:** Hawaiian words are pronounced with every vowel spoken. For example, \"Haleakalā\" is pronounced \"Ha-lay-ah-ka-lah.\"\\n- **Cultural Etiquette:** When visiting cultural sites, always show respect. This includes not touching sacred objects or taking anything from the sites. Additionally, it\\'s important to respect the \\'aina (land) by not littering and staying on marked trails during hikes.\\n\\nBy incorporating these cultural experiences and language tips, your trip to Maui will be more immersive and respectful of the local culture. Enjoy your adventure in this beautiful Hawaiian island!',\n",
       "  'timestamp': '2024-02-07T12:34:35.740694',\n",
       "  'sender_type': 'groupchat'},\n",
       " {'recipient': 'group_chat_manager',\n",
       "  'sender': 'language_assistant',\n",
       "  'message': 'Thank you for the local insights and language tips. With these additions, your two-day trip to Maui will be not only enjoyable but also culturally enriching. Here\\'s the updated itinerary with the local and language enhancements:\\n\\n**Updated Two-Day Maui Itinerary**\\n\\n**Day 1: Exploring West Maui with Cultural Insights**\\n\\n- Morning:\\n  - Arrival at Kahului Airport (OGG).\\n  - Pick up rental car.\\n  - Breakfast at a local café, trying a Hawaiian breakfast specialty.\\n  - Drive to Lahaina, a historic whaling village.\\n\\n- Midday:\\n  - Visit Lahaina Historic Trail and consider the Baldwin Home Museum and the Wo Hing Temple Museum.\\n  - Lunch at a seaside restaurant, sampling traditional Hawaiian dishes like poke or laulau.\\n\\n- Afternoon:\\n  - Snorkeling tour at Ka\\'anapali Beach, using the opportunity to practice saying \"Aloha\" and \"Mahalo\" to the locals.\\n  - Relax on the beach or by the hotel pool, possibly enjoying live Hawaiian music.\\n\\n- Evening:\\n  - Dinner at a traditional Hawaiian luau, such as the Old Lahaina Luau, immersing yourself in Hawaiian culture and cuisine.\\n  - Return to hotel for overnight stay.\\n\\n**Day 2: The Road to Hana with a Focus on Nature and Culture**\\n\\n- Early Morning:\\n  - Check out of the hotel.\\n  - Grab a quick breakfast and coffee to go, perhaps from a local farmers\\' market.\\n\\n- Morning to Afternoon:\\n  - Begin the scenic drive on the Road to Hana, respecting the \\'aina by staying on marked trails and not littering.\\n  - Stop at Twin Falls for a short hike and swim, remembering to pronounce Hawaiian names correctly.\\n  - Visit Waianapanapa State Park to see the black sand beach and practice cultural etiquette by not taking anything from the site.\\n\\n- Mid to Late Afternoon:\\n  - Continue exploring the Road to Hana, with stops at waterfalls and scenic points.\\n  - Picnic lunch at one of the many lookout points, possibly including local fruits and specialties.\\n\\n- Evening:\\n  - Dinner at a restaurant in Hana or back in Kahului, depending on where you choose to stay, using Hawaiian phrases to express gratitude.\\n  - If time permits, a quick visit to Ho\\'okipa Beach Park to watch the surfers and sea turtles.\\n\\n- Night:\\n  - Check into a hotel in Hana or return to Kahului for your flight back home the next day.\\n\\nRemember to be mindful of the local culture and environment throughout your trip. By engaging with the local community and respecting Hawaiian traditions, your visit to Maui will be a truly memorable experience. Enjoy your journey to this beautiful island paradise!',\n",
       "  'timestamp': '2024-02-07T12:34:35.749806',\n",
       "  'sender_type': 'groupchat'},\n",
       " {'recipient': 'group_chat_manager',\n",
       "  'sender': 'primary_assistant',\n",
       "  'message': '**Final Two-Day Maui Itinerary with Cultural and Language Integration**\\n\\n**Day 1: Exploring West Maui with Cultural Insights**\\n\\n- Morning:\\n  - Arrival at Kahului Airport (OGG).\\n  - Pick up rental car.\\n  - Breakfast at a local café, trying a Hawaiian breakfast specialty.\\n  - Drive to Lahaina, a historic whaling village.\\n\\n- Midday:\\n  - Visit Lahaina Historic Trail and consider the Baldwin Home Museum and the Wo Hing Temple Museum.\\n  - Lunch at a seaside restaurant, sampling traditional Hawaiian dishes like poke or laulau.\\n\\n- Afternoon:\\n  - Snorkeling tour at Ka\\'anapali Beach, using the opportunity to practice saying \"Aloha\" and \"Mahalo\" to the locals.\\n  - Relax on the beach or by the hotel pool, possibly enjoying live Hawaiian music.\\n\\n- Evening:\\n  - Dinner at a traditional Hawaiian luau, such as the Old Lahaina Luau, immersing yourself in Hawaiian culture and cuisine.\\n  - Return to hotel for overnight stay.\\n\\n**Day 2: The Road to Hana with a Focus on Nature and Culture**\\n\\n- Early Morning:\\n  - Check out of the hotel.\\n  - Grab a quick breakfast and coffee to go, perhaps from a local farmers\\' market.\\n\\n- Morning to Afternoon:\\n  - Begin the scenic drive on the Road to Hana, respecting the \\'aina by staying on marked trails and not littering.\\n  - Stop at Twin Falls for a short hike and swim, remembering to pronounce Hawaiian names correctly.\\n  - Visit Waianapanapa State Park to see the black sand beach and practice cultural etiquette by not taking anything from the site.\\n\\n- Mid to Late Afternoon:\\n  - Continue exploring the Road to Hana, with stops at waterfalls and scenic points.\\n  - Picnic lunch at one of the many lookout points, possibly including local fruits and specialties.\\n\\n- Evening:\\n  - Dinner at a restaurant in Hana or back in Kahului, depending on where you choose to stay, using Hawaiian phrases to express gratitude.\\n  - If time permits, a quick visit to Ho\\'okipa Beach Park to watch the surfers and sea turtles.\\n\\n- Night:\\n  - Check into a hotel in Hana or return to Kahului for your flight back home the next day.\\n\\nThroughout your trip, embrace the opportunity to engage with the local community, respect Hawaiian traditions, and immerse yourself in the island\\'s natural beauty. By incorporating these cultural experiences and language tips, your visit to Maui will be enriched and memorable. Have a fantastic journey to this enchanting island paradise! TERMINATE',\n",
       "  'timestamp': '2024-02-07T12:34:35.759164',\n",
       "  'sender_type': 'groupchat'}]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "group_agent_work_flow.agent_history"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "coral",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
